Skip to content

zulip: Exclude message_id from request body in update_message and reactions - #931

Open
knowprasad wants to merge 1 commit into
zulip:mainfrom
knowprasad:fix-789-strip-message-id-endpoint-requests
Open

knowprasad wants to merge 1 commit into
zulip:mainfrom
knowprasad:fix-789-strip-message-id-endpoint-requests

Conversation

@knowprasad

Copy link
Copy Markdown

Fixes: #789

Summary

In update_message, add_reaction, and remove_reaction, message_id is supplied in the URL path (/messages/{message_id} and /messages/{message_id}/reactions). Because the input dictionary was previously passed directly as the request parameter to call_endpoint, message_id was also forwarded in the request payload, triggering an ignored_parameters_unsupported: ["message_id"] warning response from the Zulip server.

This PR:

  • Strips message_id from the forwarded request payload via {k: v for k, v in data.items() if k != "message_id"} in update_message, add_reaction, and remove_reaction.
  • Preserves the caller's input dictionary without mutation.
  • Adds unit tests in zulip/tests/test_message_endpoints.py asserting that message_id is present in the endpoint URL but excluded from the body payload, and that the original dictionary is unmutated.

How did you test this PR?

Ran pytest locally across the test suite:
pytest zulip/tests/test_message_endpoints.py
All 6 tests passed cleanly.

Self-review checklist
  • Self-reviewed the changes for clarity and maintainability (variable names, code reuse, readability, etc.).

Communicate decisions, questions, and potential concerns.

  • Explains differences from previous plans (e.g., issue description).
  • Highlights technical choices and bugs encountered.
  • Calls out remaining decisions and concerns.
  • Automated tests verify logic where appropriate.

Individual commits are ready for review (see commit discipline).

  • Each commit is a coherent idea.
  • Commit message(s) explain reasoning and motivation for changes.

Completed manual review and testing of the following:

  • Visual appearance of the changes.
  • Responsiveness and internationalization.
  • Strings and tooltips.
  • End-to-end functionality of buttons, interactions and flows.
  • Corner cases, error conditions, and easily imagined bugs.

…ctions.

In update_message, add_reaction, and remove_reaction, message_id is embedded directly in the endpoint URL path. Forwarding message_id in the request payload dictionary causes the Zulip server to return an ignored_parameters_unsupported warning.

Strip message_id from the forwarded payload dictionary without mutating the caller's input dictionary.

Fixes: zulip#789.
Signed-off-by: prsdx <prsdx.dev@gmail.com>
@knowprasad
knowprasad force-pushed the fix-789-strip-message-id-endpoint-requests branch from 918281b to f75af60 Compare October 25, 2026 05:06
@zulipbot zulipbot added size: XL and removed size: L labels Oct 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ignored_parameters_unsupported in update_message's response

2 participants